import request from "./request";

export default {
  // 单个标签条，扫码时检查标签条状态，请求成功代表扫码成功，抛出异常代表标签条状态异常
  check(query) {
    return request({
      method: "GET",
      url: "/app-api/miniapp/label/check?labelCode=" + query.labelCode + '&batchno=' + query.batchno,
      data: query,
    });
  },
  // 核销标签条
  cancelStatus(query) {
    return request({
      method: "PUT",
      url: "/app-api/miniapp/label/cancel-status",
      data: query,
    });
  },
  // 核销标签条
  getBatchno(query) {
    return request({
      method: "GET",
      url: "/app-api/miniapp/label/getBatchno",
      data: query,
    });
  },
  // 核销标签条记录
  cancelRecordPage(query) {
    return request({
      method: "POST",
      url: "/app-api/miniapp/label/cancelRecordPage",
      data: query,
    });
  },
  // 核销标签条明细记录
  cancelRecordDetailPage(query) {
    return request({
      method: "POST",
      url: "/app-api/miniapp/label/cancelRecordDetailPage",
      data: query,
    });
  },
  // 汇总调用接口核销标签条明细汇总记录
  cancelRecordDetailPageByCust(query) {
    return request({
      method: "POST",
      url: "/app-api/miniapp/label/cancelRecordDetailPageByCust",
      data: query,
    });
  },
  // 核销标签条明细记录导出
  exportRecord(query) {
    return request({
      method: "PATCH",
      url: "/app-api/miniapp/label/cancelRecordDetailPageByCust/export",
      data: query,
    });
  },
}